package com.aididi.common.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ClassName CorsConfig
 * @Description todo
 * @Author xuzexiang
 * @Data 2019/8/21 16:58
 */
@Configuration
public class CorsConfig implements WebMvcConfigurer {

    public void corsFilter(CorsRegistry registry){
        registry.addMapping("*/**")
                .allowedOrigins("*")
                .allowedMethods("*")
                .allowCredentials(false)
                .maxAge(3600);
    }



}
